// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 分片上传接口 POST /api/file/slice */
export async function slice(body: any, options?: { [key: string]: any }) {
  return request('/api/file/slice', {
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data: body,
    ...(options || {}),
  });
}

/** 读取文件信息接口 POST /api/file/read */
export async function read(body: any, options?: { [key: string]: any }) {
  return request('/api/file/read', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: body,
    ...(options || {}),
  });
}
